from django import forms
from django.forms import ModelForm
from pinkewang.member.models import *

class RegisterForm(forms.Form):
    username = forms.CharField(max_length = 15)
    password = forms.CharField(max_length = 15, widget = forms.PasswordInput)
    passwordConfirm = forms.CharField(max_length = 15, widget = forms.PasswordInput)
    email = forms.EmailField()
    agreement = forms.BooleanField()

class LoginForm(forms.Form):
    username = forms.CharField(min_length = 5, max_length = 15)
    password = forms.CharField(min_length = 5, max_length = 15, widget = forms.PasswordInput)

class ProfileForm(ModelForm):
    class Meta:
        model = Member
        fields = ['telephone', 'qq', 'gender', 'avatar']
